﻿using System;
namespace Moonlite.ExtensionApi
{
    public static class ByteUtils
    {
        public static bool CompareBytes(byte[] first, byte[] second)
        {
            if (first.Length != second.Length) throw new Exception("The length of the byte arrays don't match.");
            for (int index = 0; index < first.Length; index++)
            {
                if (first[index] != second[index])
                {
                    return false;
                }
            }

            return true;
        }
    }
}
